# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: zlowly <zlowly@gmail.com>

pkgname=wqy-microhei-lite
pkgver=0.2.0_beta
pkgrel=10
pkgdesc='The "Light" face of WenQuanYi Micro Hei font family'
arch=('any')
license=('GPL3' 'APACHE' 'custom:"font embedding exception"')
url="https://wenq.org"
source=("https://sourceforge.net/projects/wqy/files/$pkgname/${pkgver//_/-}/$pkgname-${pkgver//_/-}.tar.gz")
sha512sums=('ac3ba1785c5187e1c4bf3fa919b030647371b94c26ff2d82d1c5fcc3b0626de16bc2459741f28c510a7ff804f2066b8b5708b2c451a38207b29254f9a11d2a9f')

build() {
  cd $pkgname
  tail README.txt --lines=16|head --lines=-3>| FONTEXCEPTION
}

package() {
  install -d "$pkgdir"/usr/share/fonts/wenquanyi/$pkgname/
  install -d "$pkgdir"/usr/share/licenses/$pkgname/
  install -m644 "$srcdir"/$pkgname/*.ttc "$pkgdir"/usr/share/fonts/wenquanyi/$pkgname/
  install -m644 -D "$srcdir"/$pkgname/FONTEXCEPTION "$pkgdir"/usr/share/licenses/$pkgname/FONTEXCEPTION
}
